﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace ZMHWcfServiceLibrary
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的类名“SubscriptionService”。
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
    public class SubscriptionService : SubscriptionManager<IMySSEvents>, ISubscriptionService, IPersistentSubscriptionService
    {
        //public void Subscribe(string eventOperation)
        //{
        //    throw new NotImplementedException();
        //}

        //public void UnSubscribe(string eventOperation)
        //{
        //    throw new NotImplementedException();
        //}
    }

    public class MyPublishService : PublishService<IMySSEvents>, IMySSEvents
    {
        public void OnEvent1()
        {
            FireEvent();
        }

        public void OnEvent2()
        {
            FireEvent();
        }

        public void OnEvent3()
        {
            FireEvent();
        }
    }
}
